import { MyRequest, MockRequest } from "@/utils/http";

//请求首页三级分类列表
export const getBaseCategoryListRequest = () => {
  return MyRequest.get("/api/product/getBaseCategoryList");
};

//请求Mock banner数据
export const getMockBannerList = () => {
  return MockRequest.get("/banner");
};

//请求Mock floor数据
export const getMockFloorList = () => {
  return MockRequest.get("/floor");
};

//请求search 数据
export const getSearchListRequest = (params) => {
  return MyRequest.post("/api/list", params);
};

//请求detail数据
export const getDetailListRequest = (skuId) => {
  return MyRequest.get(`/api/item/${skuId}`);
};

//添加购物车数据
export const getaddCartRequest = ({ skuId, skuNum }) => {
  return MyRequest.post(`/api/cart/addToCart/${skuId}/${skuNum}`);
};

//获取购物车列表
export const getshopCartListRequest = () => {
  return MyRequest.get("/api/cart/cartList");
};
